import { GET_DATA, } from '../actions/actionTypes';

const initialState = {
    data: null,
};

const getDataReducer = (state = initialState, action) => {
    switch (action.type) {
        case GET_DATA:{
            const { data } = action.payload;
            return { ...state, data };
        }
        default: 
            return { ...state };
        ;
    }
};

export default getDataReducer;